package com.kwedding.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kwedding.dto.app.RequestBrandDemo;
import com.kwedding.dto.web.ResponseWebDemoList;
import com.kwedding.service.app.DemoService;
import com.kwedding.util.BackJson;
import com.kwedding.util.JsonBackBase;
import com.kwedding.util.LoggerParent;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Controller
@RequestMapping("/rest/demo")
@Api(tags = "样片")
public class DemoController extends  LoggerParent{

	@Autowired
	private DemoService webDemoService;

	@ApiOperation("获取样片列表")
	@ResponseBody
	@RequestMapping(value = "getDemoList", method = { RequestMethod.POST })
	private JsonBackBase<List<ResponseWebDemoList>> getDemoList(@RequestBody RequestBrandDemo RequestBrandDemo) {
		return BackJson.successObj(webDemoService.getDemoList(RequestBrandDemo));
	}

}
